<?php
include '../common.php';
include '../common/header.php';
if (!$_SESSION['admin']) {
	header("location:../login.php",302);
}
?>
<link href="<?=$website['public'];?>/admin/user.css" rel="stylesheet" type="text/css" />
<body>
    <div class="top">板块管理 > 区主管理 > 板主管理</div>
    <div class="m5">
	    <div class="tabs">
	     	<ul class="tab_menu">
		     	<li>板主管理</li>
				<li class="li">增加</li>
	     	</ul>
	     	<div class="tab_box">
				<table class="table">
					<thead>
					<tr>
						<th class="table_th">版名</th>
						<th class="table_th">介绍</th>
						<th class="table_th">创建人</th>
						<th class="table_th">管理人</th>
						<th class="table_th">是否置顶</th>
						<th class="table_th">创建时间</th>
						<th class="table_th">操作</th>
					</tr>
					<?php
					$sql = "SELECT * FROM version ORDER BY id ASC";
					$row = select($sql,$DB);
					foreach ($row as $key => $value) { ?>
					<tr>
						<td><?php echo $value['AdvancedEdu'] ?></td>
						<td><?php if(empty($value['introduce'])){
							echo "无";
						}else{
							echo $value['introduce'];
						} ?>
						</td>
						<td><?php if(empty($value['founder'])){
							echo "无";
						}else{
							echo $value['founder'];
						} ?>
						</td>
						<td><?php if(empty($value['custodian'])){
							echo "无";
						}else{
							echo $value['custodian'];
						} ?>
						</td>
						<td><?php if(empty($value['topper'])){
							echo "否";
						}else{
							echo "是";
						} ?>
						</td>
						<td><?php if(empty($value['hour'])){
							echo "无";
						}else{
							echo date('Y-m-d H:i:s',$row[0]['hour']);
						} ?>
						</td>
						<td>
							<a href="?delete=<?php echo $value['id']?>"><i class="iconfont icon-shanchu"></i></a>
							<a href="?power=<?php echo $value['id']?>"><i class="iconfont icon-bianji"></i></a>
						</td>
					</tr>
					<?php } ?>
					</thead>	
				</table>
	     	</div>
	    </div>
	</div>
</body>
</html>